-
Notifications
You must be signed in to change notification settings - Fork 23
Add all known outstanding yaml config options as of process-compose v1.7.3 #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…1.7.3 - per-process `description` that displays in the UI - global and per-process `log_configuration`, including `rotation` - global and per-process `vars` for supporting Go template expansion on configs - `env_cmds` allows running host commands to populate env variables - `ordered_shutdown` controls the order of process shutdown - `is_strict` does additional checking on configuration files at startup - `disable_env_expansion` to not propagate .env variables to processes - `http_get.{headers,status_code}` and `working_dir` for probe commands - `replicas` to run multiple copies of processes - `entrypoint` alternate to `command` - `is_elevated` for sudo/runas priviledged processes - `extends,is_disabled,is_dotenv_disabled` for multi-file fragments and overrides. - `launch_timeout_seconds` for daemon processes
This comment was marked as off-topic.
This comment was marked as off-topic.
@shivaraj-bh Does this look good to be merged? |
|
||
disable_env_expansion = mkOption { | ||
type = types.nullOr types.bool; | ||
default = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed here setting this to true
would be more appropriate and sane. It should be highlighted in the README\docs as it would diverge from PCs default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also add all env vars from here to here:
process-compose-flake/nix/process-compose/cli.nix
Lines 18 to 27 in e968a94
environment = mkOption { | |
default = { }; | |
description = "Environment variables to pass to process-compose binary."; | |
type = types.submodule { | |
options = { | |
PC_DISABLE_TUI = mkOption { | |
type = types.nullOr types.bool; | |
default = null; | |
description = "Disable the TUI (Text User Interface) of process-compose"; | |
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are also some missing flags here, like disable-dotenv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not inline this where the option is defined?
(Aside: I am not sure if this is even useful for nix-based configuration, IIUC let-bindings in nix make these redundant)
extends = mkOption { | ||
type = types.nullOr types.path; | ||
default = null; | ||
example = "process-compose.base.yaml"; | ||
description = '' | ||
Make the current configuration inherit all values in the given file. | ||
See https://f1bonacc1.github.io/process-compose/merge#configuration-inheritance-with-extends | ||
''; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant? Nix’s module system (by design) allows us to do this?
This and the vars
comment makes me think: do we have to create options for every setting to replicate upstream? How about we make settings
a freeform module? This should allow us to keep the API small (limited to what’s actually needed), while allowing users to still be able to set settings that are not defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's nice to have typed and documented options, although it increases maintenance burden
but what's annoying is not being able to easily configure stuff which has not been explicitly added yet, so maybe we could have extraEnvironment
for na extraOptions
(for flags) in which people could pass arbitrary untyped config? It would be similar to pattern use in nixos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regarding extends
: might be useful for peoaple gradually migrating from multi-yaml configs, but we could warn in description that it's not advised when used with nix
description
that displays in the UIlog_configuration
, includingrotation
vars
for supporting Go template expansion on configsenv_cmds
allows running host commands to populate env variablesordered_shutdown
controls the order of process shutdownis_strict
does additional checking on configuration files at startupdisable_env_expansion
to not propagate .env variables to processeshttp_get.{headers,status_code}
andworking_dir
for probe commandsreplicas
to run multiple copies of processesentrypoint
alternate tocommand
is_elevated
for sudo/runas priviledged processesextends,is_disabled,is_dotenv_disabled
for multi-file fragments and overrides.launch_timeout_seconds
for daemon processes